import Cookies from 'js-cookie'

const TokenKey = 'Admin-Token'
const TokenoosKey = 'Admin-Tokenoos'
const UserInfo = 'User-Info'
const KeeperAuth = 'Keeper-Auth'
const IDaaSAuth = 'IDaaS-Auth'
const addressUrl = 'addressUrl'

export function setAddressUrl(token) {
  return Cookies.set(addressUrl, token)
}

export function getAddressUrl() {
  return Cookies.get(addressUrl)
}

export function getToken() {
  return Cookies.get(TokenKey)
}
export function setToken(token) {
  return Cookies.set(TokenKey, token)
}
// export function getToken(obj) {
//   return Cookies.get(obj)
// }
// export function setToken(name,token) {
//   return Cookies.set(name, token)
// }


export function getTokenoos() {
  return Cookies.get(TokenoosKey)
}

export function setTokenoos(token) {
  return Cookies.set(TokenoosKey, token)
}

export function removeTokenoos() {
  return Cookies.remove(TokenoosKey)
}

export function removeToken() {
  return Cookies.remove(TokenKey)
}

export function getInfo() {
  return Cookies.get(UserInfo)
}

export function setInfo(info) {
  return Cookies.set(UserInfo, info)
}

export function removeInfo() {
  return Cookies.remove(UserInfo)
}

export function getKeeperAuth() {
  return Cookies.get(KeeperAuth)
}

export function setKeeperAuth(info) {
  return Cookies.set(KeeperAuth, info)
}

export function getIDaaSAuth(obj) {
  return Cookies.get(obj)
  // return Cookies.get(IDaaSAuth)
}

export function setIDaaSAuth(info) {
  return Cookies.set(IDaaSAuth, info)
}
// export function setIDaaSAuth(obj,info) {
//   return Cookies.set(obj, info)
// }